<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Basic Layout - jQuery EasyUI Demo</title>
	<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.5.5/themes/default/easyui.css">
	<link rel="stylesheet" type="text/css" href="jquery-easyui-1.5.5.5/themes/icon.css">
	<script type="text/javascript" src="jquery-easyui-1.5.5.5/jquery.min.js"></script>
    <script type="text/javascript" src="jquery-easyui-1.5.5.5/jquery.easyui.min.js"></script>
   
    <style>
        
        *{
            margin: 0;
            padding: 0;
        }
        h2{
            text-align: center;
            color: red;
            height: 40px;
            line-height: 40px;
        }
        .header{
            width: 100%;
            height: 40px;
            position: relative;
            /* background: url("https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1537283295789&di=9b05a673ccce9fe633bdfc91c9b6ecd3&imgtype=0&src=http%3A%2F%2Fimages.missyuan.com%2Fattachments%2Fday_150419%2F20150419_ee9cf0ed3c104c751599xOpxbeds1Z70.gif") 0 -370px; */
            background: black;
            
        }
       .header img{
            display: block;
            height: 40px;
            width: 40px;
            border-radius: 50%;
            position: absolute;
            left: 20px;
            top: 1px
        }
        a{
            text-decoration: none;
            color: 
        }
        

    </style>
</head>
<body>
    <div class="header">
	<h2>Content Manager System</h2>
    <!-- <img src="https://ss3.bdstatic.com/70cFv8Sh_Q1YnxGkpoWK1HF6hhy/it/u=1486267876,1000611917&fm=26&gp=0.jpg"> -->
    </div>
	<div class="easyui-layout"  data-options="fit:true">
        <div data-options="region:'north'" style="height:50px">
                <div class="easyui-panel" style="padding:5px;">
                    <a href="#" class="easyui-linkbutton" data-options="plain:true">首页</a>
                    <a href="#" class="easyui-menubutton" data-options="menu:'#mm1',iconCls:'icon-edit'">编辑</a>
                    <a href="#" class="easyui-menubutton" data-options="menu:'#mm2',iconCls:'icon-help'">帮助</a>
                    <a href="#" class="easyui-menubutton" data-options="menu:'#mm3'">关于</a>
                </div>
                <div id="mm1" style="width:150px;">
                    <div data-options="iconCls:'icon-undo'">Undo</div>
                    <div data-options="iconCls:'icon-redo'">Redo</div>
                    <div class="menu-sep"></div>
                    <div>Cut</div>
                    <div>Copy</div>
                    <div>Paste</div>
                    <div class="menu-sep"></div>
                    <div>
                        <span>Toolbar</span>
                        <div>
                            <div>Address</div>
                            <div>Link</div>
                            <div>Navigation Toolbar</div>
                            <div>Bookmark Toolbar</div>
                            <div class="menu-sep"></div>
                            <div>New Toolbar...</div>
                        </div>
                    </div>
                    <div data-options="iconCls:'icon-remove'">Delete</div>
                    <div>Select All</div>
                </div>
                <div id="mm2" style="width:100px;">
                    <div>Help</div>
                    <div>Update</div>
                    <div>About</div>
                </div>
                <div id="mm3" class="menu-content" style="background:#f0f0f0;padding:10px;text-align:left">
                    <img src="http://www.jeasyui.com/images/logo1.png" style="width:150px;height:50px">
                    <p style="font-size:14px;color:#444;">Try jQuery EasyUI to build your modern, interactive, javascript applications.</p>
                </div>
        
        
        
        </div>
        <div data-options="region:'south',split:true" style="height:50px;">
            <!-- <button id="btnTest">按钮测试</button> -->
        </div>
        <div data-options="region:'west',split:true" title="模块信息" style="width:200px;">
                <div class="easyui-accordion" data-options="fit:true">
                        <div title="模块列表" data-options="iconCls:'icon-ok'" style="overflow:auto;padding:10px;">
                            <h3 style="color:#0099FF;">基础模块</h3>
                            <ul class="openMenu">
                                <li>
                                    <a href="javascript:void(0)" data-link="./pages/user.html">用户管理</a>
                                </li>
                                <li>
                                    <a href="javascript:void(0)" data-link="./pages/cate.html">分类管理</a>
                                </li>
                                <li>
                                    <a href="javascript:void(0)" data-link="./pages/news.html">新闻管理</a>
                                </li>
                                <li>
                                    <a href="javascript:void(0)" data-link="./pages/product.html">产品管理</a>
                                </li>
                            </ul>
                        </div>
                        <div title="Help" data-options="iconCls:'icon-help'" style="padding:10px;">
                            <p>
                                The accordion allows you to provide multiple panels and display one or more at a time. 
                            </p> 		
                        </div>
                    </div>

        </div>
		<div data-options="region:'center',title:'Main Title',iconCls:'icon-ok'">
           <div id="tt" class="easyui-tabs"></div>
		</div>
	</div> 
</body>
</html>
<script>
    $(".openMenu a").click(function () {
        var title = $(this).text();
        if ($('#tt').tabs('exists', title)) {
            $('#tt').tabs('select', title);
            var url = $(this).attr("data-link");
            var selTab = $('#tt').tabs('getSelected');
            $('#tt').tabs('update', {
                tab: selTab,
                options: {
                    content: `<iframe scrolling="auto" frameborder="0" style="width:100%;height:700px" src=${url}></iframe>`
                }
            })
        } else {
            var url = $(this).attr("data-link");
            $('#tt').tabs('add', {
                title: title,
                content: `<iframe scrolling="auto" frameborder="0" style="width:100%;height:700px" src=${url}></iframe>`,
                closable: true
            });
        }
    })
</script>
<!-- <script>
//属性和事件是这个对象本事自带的 自己调用
 $('#dg').datagrid({
        url: 'datagrid_data1.json',
        method: 'get',
        fit: true,
        border: 'none',
        columns: [
            [{
                field: 'itemid',
                title: 'itemid',
                width: 100
            }, {
                field: 'productid',
                title: '产品ID',
                width: 100
            }, {
                field: 'listprice',
                title: 'Price',
                width: 100,
                align: 'right'
            }]
        ],
        onDblClickRow:function(index,row){
            console.log(index,row)
        }
    });
    
 //方法是给别人调用的   
    $("#btnTest").click(function(){
        console.log('按钮测试')
        $('#dg').datagrid('appendRow',{
            itemid:'xxx',
            productid:'yyy',
            listprice:'zzz'
        });
    })
    


</script> -->
